<?php $this->load->view('layout/header');?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <h3 class="page-title">提现管理<small> 提现审核</small></h3>
            <?php echo breadcrumb(array('withdraw/index'=>'提现管理', '提现审核')); ?>
        </div>
    </div>
    <?php echo execute_alert_message() ?>
    <div class="row-fluid">
        <div class="span6">
            <div class="portlet sale-summary">
                <div class="portlet-title">
                    <div class="caption">提现记录</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <ul class="unstyled">
                    <li>
                        <span class="sale-info">提现用户</span> 
                        <span class="sale-num"><?php echo $withdrawInfo->uid, '/', $withdrawInfo->user_name;?></span>
                    </li>
                    <li>
                        <span class="sale-info">提现金额</span> 
                        <span class="sale-num"><?php echo number_format($withdrawInfo->amount, 2, '.', ','); ?></span>
                    </li>
                    
                    <li>
                        <span class="sale-info">银行名称</span> 
                        <span class="sale-num"><?php echo $withdrawInfo->bank_name;?></span>
                    </li>
                    <li>
                        <span class="sale-info">银行卡号</span> 
                        <span class="sale-num"><?php echo wordwrap($withdrawInfo->bank_card, 4, ' ', true);?></span>
                    </li>
                    <li>
                        <span class="sale-info">持卡人</span> 
                        <span class="sale-num"><?php echo $withdrawInfo->cardholder;?></span>
                    </li>
                    <li>
                        <span class="sale-info">身份证 </span> 
                        <span class="sale-num"><?php echo $withdrawInfo->pin; ?></span>
                    </li>
                    <li>
                        <span class="sale-info">银行预留手机号码 </span> 
                        <span class="sale-num"><?php echo $withdrawInfo->mobile_phone; ?></span>
                    </li>
                </ul>
            </div>
        </div>
        <div class="span6">
            <div class="portlet sale-summary">
                <div class="portlet-title">
                    <div class="caption">提现状态</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <ul class="unstyled">
                    <?php if ( $withdrawInfo->is_from == 3 ) : ?>
                    <li>
                        <span class="sale-info">提现景区</span> 
                        <span class="sale-num"><?php echo $withdrawInfo->sid, '/', $withdrawInfo->scenery_name;?></span>
                    </li>
                    <?php else : ?>
                    <li>
                        <span class="sale-info">提现设备 </span> 
                        <span class="sale-num"><?php echo ($withdrawInfo->is_from == 1) ? '电脑端' : '手机端'; ?></span>
                    </li>
                    <li>
                        <span class="sale-info">支付状态 </span>
                        <span class="sale-num"><?php echo ($withdrawInfo->status == 2) ? '已支付' : '未支付'; ?></span>
                    </li>
                    <?php endif; ?>
                    <li>
                        <span class="sale-info">用户原有金额</span> 
                        <span class="sale-num"><?php echo number_format($withdrawInfo->amount_carry, '2', '.', ',');?></span>
                    </li>
                    
                    <?php if ($withdrawInfo->status == 2) : ?>
                    <li>
                        <span class="sale-info">审核状态 </span> 
                        <span class="sale-num">
                            <?php if ($withdrawInfo->state == 0){
                                        echo '未审核';
                                  }
                                  elseif ($withdrawInfo->state == 1)
                                  {
                                      echo '一审成功';
                                  }
                                  elseif($withdrawInfo->state == 2)
                                  {
                                    echo '二审成功';
                                  }
                            ?>
                        </span>
                    </li>
                    <?php endif; ?>
                    <li>
                        <span class="sale-info">创建时间 </span> 
                        <span class="sale-num"><?php echo $withdrawInfo->created_at; ?></span>
                    </li>
                    <li>
                        <span class="sale-info">支付时间 </span> 
                        <span class="sale-num"><?php echo $withdrawInfo->pay_time; ?></span>
                    </li>
                    <li>
                        <span class="sale-info">审核时间 </span> 
                        <span class="sale-num"><?php echo $withdrawInfo->updated_at; ?></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-picture"></i>提现审核记录</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <table class="table table-condensed table-hover">
                        <tr>
                            <th>审核编号</th>
                            <th>审核人</th>
                            <th>审核状态</th>
                            <th>备注</th>
                            <th>审核时间</th>
                        </tr>
                        <?php if ($withdrawAudit->num_rows() > 0) :?>
                            <?php foreach ($withdrawAudit->result() as $item) : ?>
                                <tr>
                                    <td><?php echo $item->audit_id;?></td>
                                    <td><?php echo $item->audit_uid, '/', $item->audit_name;?></td>
                                    <td>
                                    <?php if ($item->state == 1) : ?>
                                        <span class="btn mini green"> 审核成功</span>
                                    <?php else : ?>
                                        <span class="badge label-warning"> 审核失败</span>
                                    <?php endif; ?>
                                    </td>
                                    <td><?php echo $item->describe;?></td>
                                    <td><?php echo $item->audit_time;?></td>
                                </tr>
                            <?php endforeach;?>
                        <?php endif;?>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="form-actions">
        <a href="<?php echo ($withdrawInfo->is_from == 3) ? base_url('withdraw/sceneryScan') : base_url('withdraw/index'); ?>">
            <button class="btn" type="button">返回</button>
        </a>
    </div>
</div>
<?php $this->load->view('layout/footer');?>